version: '3.7'
services:
  rabbitmq:
    image: rabbitmq:3-management
    restart: on-failure
    networks:
      - gog
    ports:
      - 15672:15672
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  config:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
    build: config/
    image: config
    restart: on-failure
    networks:
      - gog
    ports:
      - 8888:8888
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  registry:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
    build: registry/
    image: registry
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    ports:
      - 8761:8761
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  gateway:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
    build: gateway/
    image: gateway
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    ports:
      - 80:4000
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  auth-service:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
      NOTIFICATION_SERVICE_PASSWORD: sesame
      STATISTICS_SERVICE_PASSWORD: sesame
      ACCOUNT_SERVICE_PASSWORD: sesame
    build: auth-service/
    image: auth-service
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  account-service:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
      ACCOUNT_SERVICE_PASSWORD: sesame
    build: account-service/
    image: account-service
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  statistics-service:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
      ACCOUNT_SERVICE_PASSWORD: sesame
    build: statistics-service/
    image: statistics-service
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  notification-service:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
      NOTIFICATION_SERVICE_PASSWORD: sesame
    build: notification-service/
    image: notification-service
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  monitoring:
    environment:
      CONFIG_SERVICE_PASSWORD: sesame
    build: monitoring/
    image: monitoring
    restart: on-failure
    networks:
      - gog
    depends_on:
      - config
    ports:
      - 9000:8080
    logging:
      options:
        max-size: "10m"
        max-file: "10"

  gog-db:
    environment:
      POSTGRES_USER: goguser
      POSTGRES_PASSWORD: gogpassword
      POSTGRES_DB: gog
    build: gog-db/
    image: gog-db
    restart: on-failure
    ports:
      - 5432:5432
    networks:
      - gog
    logging:
      options:
        max-size: "10m"
        max-file: "10"

networks:
  gog: